import com.troyworks.util.BitFlag;
/**
 * @author Troy Gardner
 */
class com.troyworks.util.MaskedBitFlag extends Object {
	private var __name : String;
	/* mask */
	public var m:Number;
	/* bits */
	public var b:Number;
	
	public function MaskedBitFlag(val : Number, mask:Number, name : String) {
	//	super(val);
		super();
		b = (val == null)? BitFlag.ALLBITSOFF: val;
		m = (mask == null)? BitFlag.ALLBITSOFF: mask;
	}
	public function get name():String{
		return this.__name;
	}
	public function add(mbf:MaskedBitFlag):Void{
		m |= mbf.m;
		b |= mbf.b;
	}
	public function toString():String{
		return this.name + super.toString();
	}
}